import { ColumnProps } from "@/components/ProTable/interface";

export function dict() {
    const columns: ColumnProps[] = [
        { type: "selection", fixed: "left", width: 80 },
        { type: "index", label: "#", width: 80 },
        // { type: "expand", label: "Expand", width: 100 },
        {
            prop: "name",
            label: "名称",
            width: 150,
            search: { el: "input", props: { placeholder: "字典值名称", style: "width: 180px;" } }
        },
        {
            prop: "value",
            label: "值",
            width: 150,
            search: { el: "input", props: { placeholder: "请输入字典值", style: "width: 180px;" } }
        },
        {
            prop: "code",
            label: "编码",
            width: 150,
            search: { el: "input", props: { placeholder: "字典值编码", style: "width: 180px;" } }
        },
        {
            prop: "other",
            label: "其它",
            width: 150,
            search: { el: "input", props: { placeholder: "字典值通用扩展", style: "width: 180px;" } }
        },
        {
            prop: "otherText",
            label: "说明",
            search: { el: "input", props: { placeholder: "字典值通用扩展说明", style: "width: 180px;" } }
        },
        {
            prop: "sort",
            label: "排序",
            width: 150
        },
        {
            prop: "status",
            label: "状态",
            width: 100,
            enum: [
                { label: "启用", value: 1 },
                { label: "禁用", value: 0 }
            ],
            search: { el: "select", props: { placeholder: "状态", style: "width: 100px;" } }
        },
        { prop: "operation", label: "操作", fixed: "right", width: 240 }
    ];
    return { columns };
}
